package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.ContractGroupExample.E_IS_SYSTEM;
import static org.jsola.contract.example.ContractGroupExample.E_NAME;
import static org.jsola.contract.example.ContractGroupExample.E_SORT;
import static org.jsola.contract.example.ContractGroupExample.E_SUBJECT_ID;
import static org.jsola.contract.example.ContractGroupExample.M_NAME_MAX;
import static org.jsola.contract.example.ContractGroupExample.M_NAME_NOT_NULL;
import static org.jsola.contract.example.ContractGroupExample.M_SORT_NOT_NULL;
import static org.jsola.contract.example.ContractGroupExample.M_SUBJECT_ID_MAX;
import static org.jsola.contract.example.ContractGroupExample.N_IS_SYSTEM;
import static org.jsola.contract.example.ContractGroupExample.N_NAME;
import static org.jsola.contract.example.ContractGroupExample.N_SORT;
import static org.jsola.contract.example.ContractGroupExample.N_SUBJECT_ID;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 合同类型分组
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【合同类型分组】的参数")
@Data
public class ContractGroupUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_IS_SYSTEM, example = E_IS_SYSTEM)
    private Boolean isSystem;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 255, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID)
    @Length(max = 32, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_SORT, example = E_SORT, required = true)
    @NotNull(message = M_SORT_NOT_NULL)
    private Integer sort;


}

